---
title: Activation and hosting
summary: How the UC4 service is activated, which host projects exist, and how deployment variants differ for SAIF.Services.WCF.UC4.Host.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-22
---

# Activation and hosting

This host publishes exactly one service, `UC4Service`, at the route name `UC4`, registered by route-table activation in `Global.asax.cs`. No `.svc` file exists anywhere in the repository — this is the expected shape for every host in this repository, not a gap.

## Activation mechanism

| Aspect | Finding |
| --- | --- |
| Mechanism | Route-based (`ServiceRoute`) |
| Registered in | `src/WCF/SAIF.Services.WCF.UC4.Host/Global.asax.cs` — `Application_Start` |
| Host factory | `System.ServiceModel.Activation.ServiceHostFactory`, instantiated once and shared |
| `.svc` files present | None — a recursive search for `*.svc` across the repository returned zero files |
| Route table is authoritative | Yes |
| `<system.serviceModel><services>` entries | 1 service element (`SAIF.Services.WCF.UC4.Host.Services.UC4Service`), no `<endpoint>` children |

`Web.config` declares `<services><service name="SAIF.Services.WCF.UC4.Host.Services.UC4Service"/></services>` with no child elements at all. This corroborates the service's identity but supplies no operation, address, binding, or contract information; reading the configuration alone would not reveal a single callable address. The route table is the authoritative activation surface, and `ServiceHostFactory` supplies the endpoint defaults — WCF protocol mapping maps the `http` scheme to `basicHttpBinding` by default.*

## Route registrations

| Route | Service class | Address suffix | Registered at |
| --- | --- | --- | --- |
| `UC4` | `SAIF.Services.WCF.UC4.Host.Services.UC4Service` (`src/WCF/SAIF.Services.WCF.UC4.Host/UC4Service.cs`) | `/UC4` — for the deployed application `wcf_uc4`, an address of the form `<host>/wcf_uc4/UC4`, where `<host>` (the deployment host and port) is not present in this repository* | `src/WCF/SAIF.Services.WCF.UC4.Host/Global.asax.cs:16` |

`Application_Start` performs exactly two actions — construct the factory and add this single route — and there is no route for any other type (`Global.asax.cs:13, 16`). The literal route string is `UC4`; the address segment is the literal string, not the class name.

## Activation and classification evidence

**The pipeline markers disagree with each other inside one repository.** This host's `AppType` is `api` (`pipelines/build-vars.UC4.yml`), while the sibling `SAIF.Services.WCF.Host` carries `AppType: web` (`pipelines/build-vars.yml`); this host's own build steps template is the *web* template (`/Steps/NETFramework/build-steps-web.yml@templates`, run twice) while its release template is the *api* deploy template (`Stages/v2/deploy-stages-api-iis.yml@templates`). Neither pipeline value classifies the host. The decisive source marker — `RouteTable.Routes.Add(new ServiceRoute("UC4", factory, typeof(UC4Service)))` in `Global.asax.cs:16`, corroborated by `[AspNetCompatibilityRequirements]` on `UC4Service` and `<system.serviceModel>` in `Web.config` — is what this document set is built from; an `apiApp`/`frontEndApp` reading of the pipeline marker is recorded here and overruled.

## Activation diagram

The following diagram visualizes how a request reaches the `UC4Service` instance.

```mermaid
flowchart TD
    START["Application_Start"] --> FACT["var factory =<br>new ServiceHostFactory()"]
    FACT --> ADD["RouteTable.Routes.Add<br>new ServiceRoute UC4"]
    ADD --> TABLE["Route table<br>UC4 to UC4Service"]
    REQ["Caller request<br>to the UC4 route"] --> TABLE
    TABLE --> HOST["ServiceHost created<br>for UC4Service"]
    HOST --> DISPATCH["Operation dispatched"]
```

## Configuration-declared services

| Service element | Class named | Endpoints declared | Effect |
| --- | --- | --- | --- |
| `<service name="SAIF.Services.WCF.UC4.Host.Services.UC4Service"/>` | `UC4Service` | None | Selects the default service behavior for this class; supplies no addressable endpoint of its own — the route registration above is what makes the service callable |

## Host inventory

This repository contains four deployable SOAP host projects. This host is the UC4 job-invocation host; the other three have their own document sets.

| Host project | Services registered | Platform | Document set |
| --- | --- | --- | --- |
| `SAIF.Services.WCF.UC4.Host` | `UC4Service` (route `UC4`) | `AnyCPU` on `Release`/`Prod`; `x64` on `Debug`/`QA` | This set |
| `WCF` (`SAIF.Services.WCF.Host`) | `FileService` (`FileService`), `PreferenceService` (`PreferenceService`), `WebContextService` (`WebContext`), `ImagingService` (`Imaging`), `FaxService` (`Fax`), `SecurityService` (`Security`) | Any CPU / x86 / x64, incl. `ReleaseExternal` | [WCF](../wcf/index.md) |
| `SAIF.Services.WCF32.Host` | `ImagingService` (route `Imaging`) | x86 (every configuration) | Not documented — SOAP-typed (`ServiceRoute` activation) but no pipeline reference and no `.nuspec` reference; see `docgen-manifest.md` |
| `SAIF.Services.WCF.PDF.Host` | `PdfService` (route `PDF`) | x64 | Not documented — SOAP-typed (`ServiceRoute` activation) but no pipeline reference and no `.nuspec` reference; see `docgen-manifest.md` |

**Duplication finding for this host: none.** `UC4Service` is registered by exactly one host, on exactly one route name, in exactly one solution (`SAIF.Services.WCF.UC4.Host.sln`). The duplication that exists in this repository — `ImagingService`, registered by both `WCF` and `SAIF.Services.WCF32.Host` under two different namespaces — does not touch this host, and this document set carries no `ImagingService` cross-reference.

**A weaker, non-functional duplication fact does apply here:** the `Global.asax` code-behind class in this host is declared in namespace `SAIF.Services.WCF.Host` — the same namespace the main host uses — and `Properties/AssemblyInfo.cs` still carries `AssemblyTitle("SAIF.Services.WCF.Host")` and `AssemblyProduct("SAIF.Services.WCF.Host")`, copy-paste residue from the main host rather than a functional link (`src/WCF/SAIF.Services.WCF.UC4.Host/Global.asax.cs:7`; `Global.asax` `Inherits="SAIF.Services.WCF.Host.Global"`; `Properties/AssemblyInfo.cs`). See [Tech debt](tech-debt.md).

## Deployment variants

**The two-variant finding for this host, stated precisely:** the build pipeline runs the web build template twice, with internal and external parameter triples, exactly as the main host's pipeline does, but the variables that would give those triples values (`BuildConfigurationInternal/External`, `ArtifactNameInternal/External`) are not declared in `build-vars.UC4.yml` — they come, if at all, from the shared `/Projects/SAIF/build-vars.yml` template in the external `SAIF/YAML_Templates` repository, which could not be read.** Meanwhile, this host declares only four configurations (`Debug`, `Release`, `QA`, `Prod`), has no `ReleaseExternal` configuration, ships no `Web.ReleaseExternal.config` (or any transform at all), and `release.UC4.yml` deploys one artifact (`$(ArtifactName)` = `app`), not the `app-internal`/`app-external` pair the main host deploys. So the *pipeline shape* is two-pass while the *deployable surface* declared in this repository is single-variant.

| Variant | Build configuration | Artifact name | Config transform | IIS authentication | App-pool settings | Differing symbols |
| --- | --- | --- | --- | --- | --- | --- |
| Primary (`IsPrimary: true`) | `$(BuildConfigurationInternal)` — not defined in this repository, inherited from `/Projects/SAIF/build-vars.yml@templates`** | `$(ArtifactNameInternal)` — same, not defined here** | None — host ships one `Web.config` | Windows `true`, Anonymous `true` | Pipeline mode `Integrated` | None declared in `.csproj`; `Release` defines `TRACE` only |
| Secondary (`IsPrimary: false`) | `$(BuildConfigurationExternal)` — not defined in this repository** | `$(ArtifactNameExternal)` — same** | None | Same (one release stage set, one artifact deployed) | Same | Unknown** |
| Released artifact | `BuildConfiguration: Release` | `ArtifactName: app` | None | Windows `true`, Anonymous `true` | `Integrated` | `TRACE` |

### Variant differences

This host ships a single `Web.config` with no `Web.Base.config`, `Web.Debug.config`, `Web.Release.config`, or `Web.ReleaseExternal.config` transform — an enumeration of `Web.*.config` in this project returns exactly one file. The internal/external configuration split that exists for `SAIF.Services.WCF.Host` (which does ship `Web.Base.config` and `Web.ReleaseExternal.config`) does not apply to this host and must not be generalized onto it.

## IIS configuration

| Aspect | Finding |
| --- | --- |
| Site / virtual directory | Not determined from source |
| Deployed application name | `wcf_uc4` (`pipelines/build-vars.UC4.yml`, `AppName`; corroborated by `APP_NAME = "wcf_uc4"` in `UC4Service.cs:26`) |
| Windows authentication | `true` (`IISWindowsAuth`, `pipelines/build-vars.UC4.yml`) |
| Anonymous authentication | `true` (`IISAnonymousAuth`, `pipelines/build-vars.UC4.yml`) |
| App-pool pipeline mode | `Integrated` (`IISAppPoolPipelineMode`, `pipelines/build-vars.UC4.yml`) |
| Deploy template | `Stages/v2/deploy-stages-api-iis.yml@templates` (`pipelines/release.UC4.yml`) |
| `httpErrors` mode | `Detailed` (`<system.webServer>`, `Web.config`) |
| `multipleSiteBindingsEnabled` | true |

Service metadata (WSDL) is published over HTTP GET with no TLS enforcement confirmed at the binding level; this finding was evaluated for [Tech debt](tech-debt.md) but excluded because it did not meet the CRITICAL/HIGH severity bar established for that table.

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Operations](operations.md)
- [Faults and error pipeline](faults.md)
- [Authentication and authorization](authentication-authorization.md)
- [Dependencies](dependencies.md)
- [Configuration](configuration.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Operational runbook](operational-runbook.md)
- [Tech debt](tech-debt.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `src/WCF/SAIF.Services.WCF.UC4.Host/Global.asax.cs`
- `src/WCF/SAIF.Services.WCF.UC4.Host/Global.asax`
- `src/WCF/SAIF.Services.WCF.UC4.Host/Web.config`
- `src/WCF/SAIF.Services.WCF.UC4.Host/SAIF.Services.WCF.UC4.Host.csproj`
- `src/WCF/SAIF.Services.WCF.UC4.Host/UC4Service.cs`
- `src/WCF/SAIF.Services.WCF.UC4.Host/Properties/AssemblyInfo.cs`
- `src/WCF/SAIF.Services.WCF.Host/Global.asax.cs` (comparison only)
- `src/WCF/SAIF.Services.WCF32.Host/Global.asax.cs` (comparison only)
- `src/WCF/SAIF.Services.WCF.PDF.Host/Global.asax.cs` (comparison only)
- `src/WCF/SAIF.Services.WCF.Hosts.sln` (comparison only — does not contain this project)
- `pipelines/build-vars.UC4.yml`
- `pipelines/build.UC4.yml`
- `pipelines/release.UC4.yml`
- `pipelines/build-vars.yml` (comparison only)
